import request from '@/utils/request'

// 查询可发放优惠券
export function canCoupon(query) {
  return request({
    url: '/shopping/mallCouponsMember/canCoupon',
    method: 'post',
    params: query
  })
}
// 查询优惠券领取列表
export function listphone(query) {
  return request({
    url: '/shopping/mallCouponsMember/listphone',
    method: 'get',
    params: query
  })
}
// 查询优惠券领取列表
export function listMallCouponsMember(query) {
  return request({
    url: '/shopping/mallCouponsMember/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券领取详细
export function getMallCouponsMember(id) {
  return request({
    url: '/shopping/mallCouponsMember/' + id,
    method: 'get'
  })
}

// 新增优惠券领取
export function addMallCouponsMember(data) {
  console.log(data)

  return request({
    url: '/shopping/mallCouponsMember',
    method: 'post',
    data: data
  })
}

// 修改优惠券领取
export function updateMallCouponsMember(data) {
  return request({
    url: '/shopping/mallCouponsMember',
    method: 'put',
    data: data
  })
}

// 删除优惠券领取
export function delMallCouponsMember(id) {
  return request({
    url: '/shopping/mallCouponsMember/' + id,
    method: 'delete'
  })
}
// 删除优惠券领取
export function logicDelMallCouponsMember(id) {
  return request({
    url: '/shopping/mallCouponsMember/' + id,
    method: 'delete'
  })
}

// 导出优惠券领取
export function exportMallCouponsMember(query) {
  return request({
    url: '/shopping/mallCouponsMember/export',
    method: 'get',
    params: query
  })
}
